home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / SampleSMSAMServer / DebuggingGear.p < prev    next >
Encoding:
Text File  |  1995-07-28  |  867 b   |  60 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        DebuggingGear.p
  3.  
  4.     Contains:    *** put contents here ***
  5.  
  6.     Written by:    Keith Stattenfield
  7.  
  8.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History:
  11.  
  12.         11/15/92    KSS        Created
  13.  
  14.     To Do:
  15. }
  16.  
  17. unit DebuggingGear;
  18.  
  19. interface
  20.  
  21.     {$Z+} {$%+}
  22.     procedure %_BP;
  23.     procedure %_EP;
  24.     
  25.     
  26. implementation
  27.     type
  28.         LongintPtr = ^longint;
  29.  
  30.     var
  31.         gBPCount : longint;
  32.     
  33.     procedure BP(pc : longint); C; external;
  34.     procedure EP(pc : longint); C; external;
  35.  
  36.     function GetA6 : longint; inline $2E8E; { MOVE.L a6, (a7) }
  37.     
  38.     {$Z+} {$%+} {$D+}
  39.     procedure %_BP;
  40.     begin
  41.         gBPCount := gBPCount + 1;        
  42.  
  43.         if (gBPCount = 1) then
  44.             BP(LongintPtr(LongintPtr(GetA6)^+4)^);
  45.  
  46.         gBPCount := gBPCount - 1;
  47.     end;
  48.  
  49.     {$Z+} {$%+}
  50.     procedure %_EP;
  51.     begin
  52.         gBPCount := gBPCount + 1;        
  53.  
  54.         if (gBPCount = 1) then
  55.             EP(LongintPtr(GetA6+4)^);
  56.             
  57.         gBPCount := gBPCount - 1;
  58.     end;
  59.  
  60. end.